#pragma once


#define STRICT_TYPED_ITEMIDS    // Use for better type safety if 

#include <windows.h>
#include <windowsx.h>           // For WM_COMMAND handling macros
#include <shlobj.h>             // For shell 
#include <shlwapi.h>            // QISearch, easier way to implement QI
#include <commctrl.h>
#include <strsafe.h>
#include <uxtheme.h>
#include <vssym32.h>
#include "resource.h"

__inline int RectWidth(const RECT &r) { return r.right - r.left; }
__inline int RectHeight(const RECT &r) { return r.bottom - r.top; }

enum POPUPPARTS
{
    POPUP_CHECK,
    POPUP_TEXT,
    POPUP_SEPARATOR,
    POPUP_MAX
};

struct MENUITEMDATA
{
    HMENU   hmenu;
    int     id;
    SIZE    rgPopupSize[POPUP_MAX]; // Dimensions of each menu item 
                                    // component        
};

struct MENUITEM 
{
    MENUITEMINFO    mii;
    MENUITEMDATA*   pmid;
    WCHAR           szItemText[256];
};

struct DRAWITEMMETRICS
{
	RECT rcSelection;           // Selection rectangle
	RECT rcGutter;              // Gutter rectangle
	RECT rcCheckBackground;     // Check background rectangle
	RECT rgrc[POPUP_MAX];       // Menu subitem rectangles
};
